﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DHAA.Areas.Administrator.Models.AdminModels>" %>

    <style type="text/css">
        .style1
        {
            width: 640px;
        }
    </style>

    <% using (Ajax.BeginForm("Edit", new AjaxOptions { UpdateTargetId = "fancybox-content", LoadingElementId = "loadingIcon", OnBegin = "MvcFormOnBegin", OnSuccess = "MvcFormOnSuccess", OnComplete = "MvcFormOnComplete", OnFailure = "MvcFormOnFailure" }))
       {%>
           
        <fieldset class="style1">
            <legend>Edit : <%= Html.DisplayFor(model => model.AdminName)%></legend>
            <div class="Message Error"><%= ViewData["MessageError"] %></div>
<div class="Message Success"><%= ViewData["MessageSuccess"] %></div>
<div class="cleared"></div>    
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Username)%>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Username)%>
                <%= Html.ValidationMessageFor(model => model.Username)%>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.NewPassword)%>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.NewPassword)%>
                <%= Html.ValidationMessageFor(model => model.NewPassword)%>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ConfirmPassword)%>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.ConfirmPassword)%>
                <%= Html.ValidationMessageFor(model => model.ConfirmPassword)%>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.AdminName)%>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.AdminName)%>
                <%= Html.ValidationMessageFor(model => model.AdminName)%>
            </div>
            <div class="cleared-top-5"></div>
            <div>
                <input type="submit" value="Save" />
                <div id="loadingIcon" ></div> <input type="button" value="Cancel" onclick="$.fancybox.close()"/>
            </div>
            <div class="cleared"></div>
        </fieldset>

    <% } %>


